package day0401;

import java.util.*;

public class ShuJing {
    /*
    * 递推
    * 最长山峰高度
    * */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] nums = Arrays.stream(sc.nextLine().split(","))
                .map(Integer::parseInt)
                .mapToInt(Integer::intValue)
                .toArray();
        System.out.println(maxLength(nums));


    }

    public static int maxLength(int[] nums) {
        // write code here

        if (nums.length == 0) {
            return 0;
        }
        int[] left = new int[nums.length];
        for (int i = 1; i < nums.length; i++) {
            left[i] = nums[i - 1] < nums[i] ? left[i - 1] + 1 : 0;
        }
        int[] right = new int[nums.length];
        for (int i = nums.length - 2; i >= 0; i--) {
            right[i] = nums[i + 1] < nums[i] ? right[i + 1] + 1 : 0;
        }
        int ans = 0;
        for (int i = 0; i < nums.length; i++) {
            if (left[i] > 0 && right[i] > 0) {
                ans = Math.max(ans, left[i] + right[i] + 1);
            }
        }
        return ans;
    }
}
